package ${package.Mapper};

import ${package.Entity}.${entity};
import com.qtp.common.data.BaseDao;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * ${table.comment!} Dao
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Repository
public class ${table.mapperName} extends BaseDao<${entity}> {

    /**
     * 通用全量插入，忽略null值
     *
     * @param ${entity?uncap_first} ${table.comment!}
     * @return true or false
     */
    public boolean createIgnoreNull(${entity} ${entity?uncap_first}) {
        return this.getSqlSession().insert(this.sqlId("createIgnoreNull"), ${entity?uncap_first}) == 1;
    }

    /**
     * 通用根据主键更新，忽略null值
     *
     * @param ${entity?uncap_first} ${table.comment!}
     * @return true or false
     */
    public boolean updateIgnoreNull(${entity} ${entity?uncap_first}) {
        return this.getSqlSession().update(this.sqlId("updateIgnoreNull"), ${entity?uncap_first}) == 1;
    }
}
